//
//  ViewController.m
//  BaseProject
//
//  Created by 小崔 on 2022/4/13.
//

#import "ViewController.h"

@interface ViewController ()

@property (strong,nonatomic) NSArray *dataSource;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    UIView *draggingView = [[UIView alloc] initWithFrame:CGRectMake(0, 150, 100, 100)];
    draggingView.backgroundColor = [UIColor greenColor];
    draggingView.layer.cornerRadius = 50.0f;
    draggingView.layer.masksToBounds = YES;
    [self.view addSubview:draggingView];
    // 需要先添加到superView上再设置该属性
    draggingView.draggingType = DraggingTypePullOver;
    
    UIView *cornerView = [[UIView alloc] initWithFrame:CGRectMake(50, 350, 150, 150)];
    cornerView.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:cornerView];
    [cornerView crj_setCornerType:(UIRectCornerTopLeft|UIRectCornerTopRight) cornerRadius:10];
    
    UIView *shadowView = [[UIView alloc] initWithFrame:CGRectMake(250, 350, 150, 150)];
    shadowView.backgroundColor = [UIColor blueColor];
    [self.view addSubview:shadowView];
   
    [shadowView viewShadowWithColor:[UIColor grayColor] shadowOpacity:3 shadowRadius:10 shadowPathType:CRJShadowBottomLeftRight shadowWidth:10];
    
    UIView *colorBigView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
    colorBigView.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:colorBigView];
    UIView *colorView = [[UIView alloc] initWithFrame:CGRectMake(25, 25, 50, 50)];
    colorView.backgroundColor = [UIColor purpleColor];
    [colorBigView addSubview:colorView];
    
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(200, 100, 50, 50)];
    imageView.image = [colorBigView generateImage];
    [self.view addSubview:imageView];
    
    // Do any additional setup after loading the view.
}


@end
